Improve some handling around packages #323
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a handful of minor tweaks to help with package-related commands. The most important tweak is making
packages update
properly downgrade when requested.packages list
that gives a format closer to what we use elsewhere in sansshell package commandsInstallPackage
andUpdatePackage
yum downgrade
instead ofupdate-to
whenUpdatePackage
is called to update a package to an older versionInterestingly, the behavior of
yum install-nevra
semms to differ between centos7 and fedora. On centos7 I see it refusing to downgrade and on fedora I see it installing the exact specified version.We don't have proper integration tests for this, so I did manual tests with commands going back-and-forth like
sanssh --targets localhost packages update -name bash -new_version 0:4.2.46-35.el7_9.x86_64 -old_version 0:4.2.46-34.el7.x86_64